package com.xpgk.mvc.collection.collectionServicePart;

import java.util.List;

import com.jfinal.log.Log;
import com.xpgk.annotation.Table;
import com.xpgk.mvc.base.BaseModel;


/**
 * 测量部位尺寸model
 */
@SuppressWarnings("unused")
@Table(tableName = CollecttionServicePartSize.table_name)
public class CollecttionServicePartSize  extends  BaseModel<CollecttionServicePartSize>{
	
	private static final long serialVersionUID = 2455815459962392288L;

	private static final Log log = Log.getLog(CollecttionServicePartSize.class);

	public static final CollecttionServicePartSize dao = new CollecttionServicePartSize().dao();
	
	/**
	 * 表名称
	 */
	public static final String table_name = "sb_customer_service_partsize";
	
	
	
	/**
	 * 字段描述：ids 字段类型：character varying 长度：32
	 */
	public static final String column_ids = "ids";
	
	/**
	 * 字段描述：服务记录ids 字段类型：character varying 长度：32
	 */
	public static final String column_serviceIds= "serviceIds";
	
	/**
	 * 字段描述：顾客ids 字段类型：character varying 长度：32
	 */
	public static final String column_customerIds = "customerIds";
	/**
	 * 字段描述：测量部位ids 字段类型：character varying 长度：32
	 */
	public static final String column_partIds = "partIds";
	/**
	 * 字段描述：部位尺寸 字段类型：character varying 长度：32
	 */
	public static final String column_size = "size";
	
	/**
	 * 字段描述：该条数据添加人员is  字段类型：character varying 长度：32
	 */
	public static final String column_createId = "createId";
	/**
	 * 字段描述：该条数据添加时间  字段类型：datetime 长度：0
	 */
	public static final String column_createDate = "createDate";
	/**
	 * 字段描述：该条数据更新人员id  字段类型：character varying 长度：100
	 */
	public static final String column_updateId = "updateId";
	/**
	 * 字段描述：该条数据更新时间  字段类型：datetime 长度：0
	 */
	public static final String column_updateDate = "updateDate";
	/**
	 * 描述：根据顾客id和测量部位id查出服务部位测量尺寸记录
	 */
	public static final String sqlId_selByCusAndPart= "sb.servicePartSize.selByCusAndPart";
	
	/**
	 * 描述：根据顾客id和测量部位id查出服务部位名称测量尺寸记录
	 */
	public static final String sqlId_selByCusAndPartName= "sb.servicePartSize.selByCusAndPartName";
	/**
	 * 描述：根据日期查找顾客最近一次的测量尺寸
	 */
	public static final String sqlId_selLastSize= "sb.servicePartSize.selLastSize";
	
	/**
	 * 描述：根据服务ids获取部位尺寸
	 */
	public static final String sqlId_selByServiceIds= "sb.servicePartSize.selByServiceIds";
	
	
	public List<CollecttionServicePartSize> getServicePartSize(String customerIds, String partIds) {
		String sql = "SELECT  * from   sb_customer_service_partsize  WHERE  customerIds=?  and  partIds=?  ORDER BY  gxsj  DESC";
		return CollecttionServicePartSize.dao.find(sql, customerIds, partIds);
	}

}
